<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreatTableCityShopFirstOrderPrice extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('city_shop_first_order_price', function (Blueprint $table) {
            $table->id();
            $table->string('city', 12)->default('')->comment('城市名称');
            $table->unsignedInteger('cityCode')->default(0)->comment('城市Code');
            $table->unsignedInteger('price')->default(0)->comment('订货价格');

            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '城市门店首批订货价格';

            $table->index('cityCode', 'idx_cityCode');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('city_shop_first_order_price');
    }
}
